import { http } from '../utils/request.js'

const api = '/wish-gms';
var url = {
  getCrawlAllList: api + "/v1/offlineProduct/list",
  getCrawlList: api + "/v1/offlineProduct/list",
  addCrawl: api + "/v1/offlineProduct/add",
  editCrawl: api + "/v1/offlineProduct/update/",
  getSingleCrawl: api + "/v1/offlineProduct/",
  deleteCrawl: api + "/v1/offlineProduct/delete",

}
module.exports = {
  getCrawlAllList(query) {
    return http({
      url: url.getCrawlAllList,
      data: query
    })
  },
  getCrawlList(id,query) {
    return http({
      url: url.getCrawlList + '?id=' + id,
      data: query
    })
  },
  addCrawl(form) {
    return http({
      url: url.addCrawl,
      data: form
    })
  },
  editCrawl(id, form) {
    return http({
      url: url.editCrawl + id,
      data: form
    })
  },
  getSingleCrawl(id) {
    return http({
      url: url.getSingleCrawl + id,
    })
  },
  deleteCrawl(idList) {
    return http({
      url: url.deleteCrawl,
      data: idList
    })
  },
}